import http from '@/utils/request'

//插入图片
export async function uploadNoticeFilesApi(parm){
  return await http.upload("/notice/files",parm)
}

//新建消息
export async function saveNoticeApi(parm){
  return await http.post("/notice",parm)
}


//修改消息状态
export async function editNoticeStatusApi(parm){
  return await http.put("/notice",parm)
}

//删除消息
export async function deleteNoticeApi(parm){
  return await http.delete("/notice",parm)
}

//批量删除消息
export async function deleteNoticeBatchApi(parm){
  return await http.delete("/notice/batch/delete",parm)
}

export async function getNoticeListApi(parm){
  return await http.get("/notice",parm)
}

export async function getNoticeByNoApi(parm){
  return await http.getRestApi("/notice",parm)
}

///////////公告类型方面/////////////////

//公告类型信息
export async function getNoticeTypeApi(){
  return await http.get("/notice/type")
}

//添加公告类型
export async function addNoticeTypeApi(parm){
  return await http.post("/notice/type",parm)
}

//修改公告类型
export async function editNoticeTypeApi(parm){
  return await http.put("/notice/type",parm)
}

//公告类型排序
export async function sortNoticeTypeApi(parm){
  return await http.put("/notice/type/sort",parm)
}

//删除公告类型
export async function deleteNoticeTypeApi(parm){
  return await http.delete("/notice/type",parm)
}
